﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;

namespace CSMSProject
{
    public partial class PrintInvoice : Form
    {
        public PrintInvoice(List<ReportModel> data)
        {
            InitializeComponent();
            ReportDocument cryRpt = new ReportDocument();
            cryRpt.Load(@"CrystalReport.rpt");
            crystalReport.ReportSource = cryRpt;
            crystalReportBinding.DataSource = data;
            crystalReport.RefreshReport();
        }
        public PrintInvoice()
        {
            InitializeComponent();
        }
    }
}
